<style>
    .questionSet{
          font-family:"华文细黑";
          font-size: 1px;

     }

     .img1{
     z-index: 0;
     height: 50%;
     width: 50%;
     padding: 0px;
     }

     .rbutton2{
    float: right;
    border-radius: 12px;
    font-size: 70%;
    }
 </style>
 <ion-header>
     <ion-navbar>
        <button menuToggle *ngIf="!selectedItem">
            <ion-icon name="menu"></ion-icon>
        </button>
        <ion-title>{{this.subject}}题</ion-title>
        </ion-navbar>
 </ion-header>

 <ion-content class="questionSet">
     <div padding>
         <ion-segment [(ngModel)]="questionSet">
           <ion-segment-button value="mistake">
             <font size=2>错题</font>
           </ion-segment-button>
           <!--<ion-segment-button value="goodTry">
             <font size=2>好题</font>
           </ion-segment-button>-->
         </ion-segment>
       </div>

       <div [ngSwitch]="questionSet">
         <div  *ngSwitchCase="'mistake'">
              <div  class="rbutton">
               <button ion-button block (click)="toCamera(this.subject)">
               <ion-icon name="add-circle"></ion-icon> 添加错题

               </button>
               </div>
               <div>
               <ion-segment [(ngModel)]="sortFactor">
               <ion-segment-button value="time">
                    <font size=2>时间</font>
               </ion-segment-button>
               <<!--ion-segment-button value=point>
                    <font size=2>知识点</font>
                   </ion-segment-button>
               <ion-segment-button value="reason">
                   <font size=2>错误原因</font>
               </ion-segment-button>-->
               </ion-segment>
                  <div [ngSwitch]="sortFactor">

                  <ion-list *ngSwitchCase="'time'">

                     <ion-list>
                        <ion-item *ngFor = "let item of mistakeListByTime; let i = index" (click)="gotoShowMistakePage(item)">
                            <h4> {{item.editTime}}</h4>

                            <div *ngIf="item.quesPicUrl!=''">
                               <img src ="{{item.quesPicUrl}}" class="img1"/>
                            </div>
                          <div *ngIf="item.quesPicUrl==''">
                            <p [innerHTML]="item.content"></p>
                          </div>

                        </ion-item>
                     </ion-list>
                    <div *ngIf="mistakeListByTime.length == 0">
                      <h4>&nbsp;&nbsp;您还没有为该科目添加错题</h4>
                    </div>
                 <!-- </ion-item>-->
                  </ion-list>

                  <!--<ion-list *ngSwitchCase="'point'">
                  &lt;!&ndash;<ion-item *ngFor = "let item of pointLists;let i = index" (click)="gotoDetail(i)">&ndash;&gt;
                  <ion-item *ngFor = "let item of pointLists;let i = index" (click)="gotoPointMistakeList(i)">
                     <h4>{{item.pointName}} </h4><ion-badge item-end>{{item.count}}</ion-badge>
                  </ion-item>
                  </ion-list>

                  <ion-list *ngSwitchCase="'reason'">
                     <ion-item *ngFor = "let item of mistakeList">
                      <h4>{{item.reason}}</h4><ion-badge item-end>2</ion-badge>
                     </ion-item>
                   </ion-list>-->
                  </div>
               </div>
         </div>

       </div>
 </ion-content>
